/* Desktop Navigation Base */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-left: auto;
    padding-right: 2rem;
    list-style: none;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: #ffd700;
}

/* Hide Mobile Elements by Default */
.mobile-menu-btn,
.mobile-only,
.menu-close-btn,
.mobile-menu-header {
    display: none;
}

/* Mobile Logo and Brand Styling */
.mobile-menu-logo {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.mobile-menu-logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #ffd700;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mobile-menu-brand {
    text-align: left;
}

.mobile-brand-main {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 0.3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: block;
}

.mobile-brand-sub {
    color: #ffd700;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    position: fixed;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

/* Hamburger Icon with Enhanced Animation */
.hamburger-icon {
    position: relative;
    width: 24px;
    height: 2px;
    background: #ffffff;
    display: block;
    transition: all 0.3s ease-in-out;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: #ffffff;
    transition: all 0.3s ease-in-out;
}

.hamburger-icon::before {
    transform: translateY(-8px);
}

.hamburger-icon::after {
    transform: translateY(8px);
}

/* Close Button Animation */
.mobile-menu-btn.active .hamburger-icon {
    background: transparent;
    transform: rotate(180deg);
}

.mobile-menu-btn.active .hamburger-icon::before {
    transform: rotate(45deg);
}

.mobile-menu-btn.active .hamburger-icon::after {
    transform: rotate(-45deg) translateY(0);
}

/* Hover Effects */
.mobile-menu-btn:hover .hamburger-icon,
.mobile-menu-btn:hover .hamburger-icon::before,
.mobile-menu-btn:hover .hamburger-icon::after {
    background: #ffd700;
}

/* Mobile View Styles */
@media (max-width: 768px) {
    /* Show mobile header and hide desktop header */
    .mobile-menu-header {
        display: block;
        margin-bottom: 3rem;
    }
    /* Hide desktop nav links */
    .nav-links:not(.mobile-active) {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Mobile Menu Active State */
    .nav-links.mobile-active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(93, 5, 39, 0.98), rgba(77, 2, 63, 0.98));
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 4.5rem 0.4rem 0.5rem; /* Reduced top padding */
        z-index: 1000;
        opacity: 0;
        visibility: visible;
        animation: menuFadeIn 0.4s ease forwards;
    }

    /* Mobile Header - Minimalist */
    .mobile-menu-header {
        position: absolute;
        top: 0.4rem;
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
        text-align: center;
        padding-bottom: 0.4rem;
        margin-bottom: 0.2rem;
        border-bottom: 1px solid rgba(255, 215, 0, 0.3);
        opacity: 0;
        animation: fadeIn 0.6s ease forwards 0.2s;
    }

    /* Mobile Logo and Brand - Minimalist */
    .mobile-menu-logo {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        margin-bottom: 0.25rem;
    }

    .mobile-menu-logo img {
        width: 55px;
        height: 55px;
        border-radius: 50%;
        border: 1px solid #ffd700;
        object-fit: cover;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .mobile-brand-main {
        font-family: 'Playfair Display', serif;
        font-size: 1.1rem;
        color: #ffffff;
        margin-bottom: 0.05rem;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
        display: block;
        line-height: 1.1;
    }

    .mobile-brand-sub {
        color: #ffd700;
        font-size: 0.65rem;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        display: block;
        line-height: 1;
    }

    /* Language Switcher - Integrated */
    .nav-links.mobile-active .language-switcher {
        margin-top: 0.4rem;
        padding-left: 0.4rem;
        display: flex;
        gap: 0.4rem;
        opacity: 0;
        animation: fadeIn 0.6s ease forwards 0.6s;
    }

    .language-switcher .lang-btn {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
        min-height: 28px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #ffffff;
        border-radius: 3px;
        transition: all 0.3s ease;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .language-switcher .lang-btn:hover {
        background: rgba(255, 215, 0, 0.15);
        color: #ffd700;
        border-color: #ffd700;
    }

    /* Mobile Menu Container */
    .nav-links.mobile-active {
        height: 100vh; /* Ensure full height */
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Start from top */
    }

    /* Nav Links Container */
    .nav-links.mobile-active ul {
        flex: 0 0 auto; /* Don't flex */
        margin-bottom: auto; /* Push language switcher up */
    }

    /* Mobile Navigation Links */
    .nav-links.mobile-active li {
        width: 100%;
        text-align: left;
        opacity: 0;
        transform: translateX(-20px);
        animation: linksFadeIn 0.5s ease forwards;
        animation-delay: calc(0.1s * var(--item-index));
        margin: 0rem 0;
        padding-left: 1.5rem;
        position: relative;
    }

    .nav-links.mobile-active li::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        width: 0;
        height: 2px;
        background: #ffd700;
        transform: translateY(-50%);
        transition: width 0.3s ease;
    }

    .nav-links.mobile-active li:hover::before {
        width: 1.5rem;
    }

    .nav-links.mobile-active li a {
        display: block;
        font-size: 0.8rem;
        padding: 0.75rem 1.25rem;
        color: #ffffff;
        position: relative;
        overflow: hidden;
        font-weight: 500;
        transition: all 0.3s ease;
        border-radius: 0.3rem;
        background: rgba(255, 255, 255, 0.05);
    }

    /* Enhanced Link Hover Effect */
    .nav-links.mobile-active li a:hover {
        color: #ffd700;
        background: rgba(255, 215, 0, 0.1);
        transform: translateX(10px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    /* Active Link State */
    .nav-links.mobile-active li a.active {
        color: #ffd700;
        background: rgba(255, 215, 0, 0.15);
        border-left: 3px solid #ffd700;
    }

    /* Language Switcher in Mobile Menu */
    .nav-links.mobile-active .language-switcher {
        margin-top: 3rem;
        padding-left: 2rem;
        display: flex;
        gap: 1rem;
        opacity: 0;
        animation: fadeIn 0.6s ease forwards 0.8s;
    }

    .language-switcher .lang-btn {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding: 0.5rem 1rem;
        color: #ffffff;
        border-radius: 1px;
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .language-switcher .lang-btn:hover {
        background: rgba(255, 215, 0, 0.2);
        color: #ffd700;
        border-color: #ffd700;
    }

    /* Language Switcher */
    .nav-links.mobile-active .language-switcher {
        margin-top: 0rem;
        display: flex;
        justify-content: center;
        gap: 1rem;
        opacity: 0;
        animation: fadeIn 0.6s ease forwards 0.8s;
    }

    /* Close Button */
    .menu-close-btn {
        position: fixed;
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        border: none;
        background: transparent;
        cursor: pointer;
        z-index: 1002;
        opacity: 0;
        animation: fadeIn 0.4s ease forwards 0.3s;
        display: none;
    }
}

/* Animations */
@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes linksFadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile Menu Open State */
body.menu-open {
    overflow: hidden;
}



@media (max-width: 768px) {
    /* Menu Structure */
    .menu {
        position: relative;
        padding: 0;
        background: transparent;
        overflow: visible;
    }

    /* Menu Background Positioning */
    .menu-bg {
        position: absolute;
        top: 0; /* Position it at the very top of menu section */
        left: 0;
        width: 100%;
        height: 600px;
        background: url('../images/menu-bg.jpg') no-repeat center top;
        background-size: cover;
        z-index: 1;
        opacity: 0.33; /* Slightly transparent to not overwhelm content */
    }

    .menu .container {
        position: relative;
        z-index: 5;
        padding: 1rem;
    }

    /* Menu Title (if you have one) */
    .menu h2 {
        position: relative;
        z-index: 5;
        margin-bottom: 2rem;
    }

    /* Menu Introduction */
    .menu-intro {
        position: relative;
        z-index: 5;
        margin: 1rem 0 1.5rem 0;
        padding: 1.5rem;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(93, 5, 39, 0.1);
    }

    /* Navigation Menu - Keep sticky behavior */
    .menu-nav {
        position: sticky;
        top: 80px;
        z-index: 10;
        background: rgba(255, 255, 255, 0.98);
        margin: 0 0 1.5rem 0;
        padding: 0.8rem;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(93, 5, 39, 0.1);
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .menu-nav::-webkit-scrollbar {
        display: none;
    }

    .menu-btn {
        flex: 0 0 auto;
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        border: 2px solid #5d0527;
        border-radius: 25px;
        white-space: nowrap;
        scroll-snap-align: start;
        background: transparent;
        color: #5d0527;
        transition: all 0.3s ease;
    }

    .menu-btn.active,
    .menu-btn:hover {
        background: #5d0527;
        color: white;
    }

    /* Category Grid */
    .category-previews {
        position: relative;
        z-index: 5;
        padding-top: 0.5rem;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .category-item {
        height: auto;
        aspect-ratio: 16/9;
        position: relative;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(93, 5, 39, 0.15);
        transform: translateY(0);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .category-item:first-child {
        margin-top: 0;
    }

    .category-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scale(1.05);
        transition: transform 0.3s ease;
    }

    .category-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
            180deg,
            rgba(93, 5, 39, 0.2) 0%,
            rgba(93, 5, 39, 0.8) 100%
        );
        padding: 1rem;
        color: white;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        transform: translateY(0);
    }

    .category-overlay h3 {
        font-family: 'Playfair Display', serif;
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
        color: #ffd700;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }

    .category-overlay p {
        font-size: 0.9rem;
        line-height: 1.4;
        opacity: 0.95;
        margin: 0;
        color: white;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    }

    /* Touch Interactions */
    .category-item:active {
        transform: scale(0.98);
    }

    .category-item:active img {
        transform: scale(1);
    }

    .category-item:active .category-overlay {
        background: linear-gradient(
            180deg,
            rgba(93, 5, 39, 0.3) 0%,
            rgba(93, 5, 39, 0.9) 100%
        );
    }
}

/* Small Screen Optimizations */
@media (max-width: 480px) {
    .menu-nav {
        padding: 0.8rem 0.4rem;
        margin-bottom: 1.5rem;
        top: 70px;
    }

    .menu-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .category-item {
        aspect-ratio: 4/3;
    }

    .category-overlay h3 {
        font-size: 1.3rem;
    }

    .category-overlay p {
        font-size: 0.85rem;
    }

    .menu-intro {
        padding: 1.2rem;
        margin-bottom: 1.2rem;
    }
}